/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author PR
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BasMesGw extends BasicModel<BasMesGw> {
  gwCode?: string; // 工位编码
  gwName?: string; // 工位名称
  lineCode?: string; // 产线
  operCodes?: string; // 工序
}

export const basMesGwList = (params?: BasMesGw | any) =>
  defHttp.get<BasMesGw>({ url: adminPath + '/bas/mes/gw/basMesGw/list', params });

export const basMesGwListData = (params?: BasMesGw | any) =>
  defHttp.post<Page<BasMesGw>>({ url: adminPath + '/bas/mes/gw/basMesGw/listData', params });

export const basMesGwForm = (params?: BasMesGw | any) =>
  defHttp.get<BasMesGw>({ url: adminPath + '/bas/mes/gw/basMesGw/form', params });

export const basMesGwSave = (params?: any, data?: BasMesGw | any) =>
  defHttp.postJson<BasMesGw>({ url: adminPath + '/bas/mes/gw/basMesGw/save', params, data });

export const basMesGwDelete = (params?: BasMesGw | any) =>
  defHttp.get<BasMesGw>({ url: adminPath + '/bas/mes/gw/basMesGw/delete', params });
